package com.globalwave.pos.report.web;


import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import com.globalwave.base.BaseAction;
import com.globalwave.common.C;
import com.globalwave.pos.report.entity.ReportSO;
import com.globalwave.pos.report.service.ReportBO;
import com.globalwave.system.web.annotations.Pid;
import com.opensymphony.xwork2.Preparable;


@Service("pos_reportAction")
@Scope("prototype")
public class ReportAction extends BaseAction implements Preparable {

    private static final long serialVersionUID = 8582051849254108462L;
    
    
    private ReportBO reportBO ;
    private ReportSO reportSO ;

    @Pid(value=1000)
    public String sqlName() throws Exception {
        

        renderXML(this.getMessage(reportBO.query("reportSQLs:sqlName:xx", reportSO), "").asXML()) ;
        
        
    	return null ;
    }
    
    public String paymentDaily() throws Exception {
    	
    	reportSO.setRef_source(C.REF_SOURCE_SALES_ORDER) ;
    	renderXML(reportBO.query("reportSQLs:paymentDaily", reportSO).asXML()) ;
        
    	return null ;
    }
    
    

	@Override
	public void prepare() throws Exception {
		// TODO Auto-generated method stub
		
	}



	public ReportBO getReportBO() {
		return reportBO;
	}



	public void setReportBO(ReportBO reportBO) {
		this.reportBO = reportBO;
	}



	public ReportSO getReportSO() {
		return reportSO;
	}



	public void setReportSO(ReportSO reportSO) {
		this.reportSO = reportSO;
	}



    
}
